package com.min.star.model;

import java.io.Serializable;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Range;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("sys_grade")
public class Grade extends BaseEntity implements Serializable {
	
	private static final long serialVersionUID = 4766302408157419900L;

	@TableId(type = IdType.AUTO)
	private Long id;
	
	@TableField("stu_id")
	@NotNull(message = "{grade.stuId.required}")
	private Long stuId;
	
	@TableField("cur_id")
	@NotNull(message = "{grade.curId.required}")
	private Long curId;
	
	@TableField("semester")
	@NotBlank(message = "{grade.semester.required}")
	private String semester;
	
	@TableField("grade")
	@NotNull(message = "{grade.grade.required}")
	@Range(max = 100,min = 0,message = "{grade.grade.range}")
	private int grade;
	
	@TableField(exist = false)
	private Student student;
	
	@TableField(exist = false)
	private Curriculum curriculum;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getStuId() {
		return stuId;
	}

	public void setStuId(Long stuId) {
		this.stuId = stuId;
	}

	public Long getCurId() {
		return curId;
	}

	public void setCurId(Long curId) {
		this.curId = curId;
	}

	public String getSemester() {
		return semester;
	}

	public void setSemester(String semester) {
		this.semester = semester;
	}

	public int getGrade() {
		return grade;
	}

	public void setGrade(int grade) {
		this.grade = grade;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Curriculum getCurriculum() {
		return curriculum;
	}

	public void setCurriculum(Curriculum curriculum) {
		this.curriculum = curriculum;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
